#include "BitSet.h"

void test_bitset()
{
	rtx::bitset<100> bs; //上面面试题开范围可以这样开：bitset<-1> bs1;
	bs.set(8);
	bs.set(9);
	bs.set(20);

	cout << bs.test(8) << endl;
	cout << bs.test(9) << endl;
	cout << bs.test(20) << endl;
	cout << bs.test(30) << endl << endl;

	bs.reset(8);
	bs.reset(20);

	cout << bs.test(8) << endl;
	cout << bs.test(9) << endl;
	cout << bs.test(20) << endl;
}

void test_two_bitset()
{
	int arr[] = { 3, 4, 5, 2, 3, 4, 4, 4, 4, 12, 77, 65, 44, 4, 44, 99, 33, 33, 33, 6, 5, 34, 12 };

	rtx::two_bitset<100> bs;
	for (const auto& e : arr)
	{
		bs.set(e);
	}

	bs.print_once_num();
}

int main()
{
	// test_bitset();
	test_two_bitset();

	return 0;
}